<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="../js/scripts/jquery.min.js" type="text/javascript"></script>
    <script src="../js/tz_cfg.js?version=2.0.6" type="text/javascript"></script>
    <script type="text/javascript">
        tz.cfg.base = "/sso"
    </script>
    <script src="../js/scripts/boot.js" type="text/javascript"></script>
    <!-- 引入MiniUI的样式 -->
    <link href="../plugin/miniui/default/medium-mode.css" rel="stylesheet" type="text/css" />

    <link href="../js/scripts/miniui/themes/default/miniui.css" rel="stylesheet" type="text/css" />
    <link href="../css/common_ext.css" rel="stylesheet" type="text/css" />
    <link href="../css/common.css" rel="stylesheet" type="text/css" />

    <link href="../css/mgr/baseStyle.css" rel="stylesheet" type="text/css" />
    <link href="../css/color.css" rel="stylesheet" type="text/css" />
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
    <link href="../css/tz-skin.css" rel="stylesheet" type="text/css" />

</head>

<body>
    <!-- 使用 mini表格 需要加上 mini-layout类-->
    <div class="mini-layout mainCon">
        <div region="center" width="auto" style="border:0px">
            <div class="mini-toolbar" borderStyle="border:0" style=" padding-top:11px;">
                <table id="searchPeixunForm" style="width:100%;">
                    <tr style="width: 100%">
                        <td style="white-space:nowrap;" class="mini-col-4">
                            <input class="mini-textbox" labelField="true" label="班级编号" labelStyle="width:80px"
                                id="searchClassKey" name="searchClassKey" width="95%" maxLength="50"
                                onenter="searchClassKey()" emptyText="" />
                        </td>
                        <td class="mini-col-4">
                            <input class="mini-textbox" labelField="true" label="班级名称" labelStyle="width:80px"
                                id="searchClassName" name="searchClassName" width="95%" maxLength="50"
                                onenter="searchClassName()" emptyText="" />
                        </td>

                        <td class="mini-col-4">
                            <div class="mini-toolbar" borderStyle="border:0">
                                <div class="btnCon">
                                    <a class="mini-button blueBtn mini-button-text" onclick="searchOrgByKey()"
                                        tooltip="查询">查询</a>
                                    <a class="mini-button reload blueBtn" onclick="resetSearchOrgByKey()"
                                        tooltip="重置">重置</a>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="mini-col-4">
                            <input class="mini-combobox" id="dwjb" name="dwjb" labelStyle="width:80px" labelField="true"
                                label="组织单位级别" width="95%" showNullItem="true" allowInput="false" textField="text"
                                valueField="id"
                                data='[{"id":"0","text":"省级"},{"id":"1","text":"省委托市"},{"id":"2","text":"全部"}]' />
                        </td>
                        <td class="mini-col-4">
                            <input class="mini-combobox" id="classStaus" name="classStaus" labelStyle="width:80px"
                                labelField="true" label="班级状态" width="95%" textField="text" valueField="id"
                                data='[{"id":"0","text":"待发布"},{"id":"1","text":"待报名"},{"id":"2","text":"报名中"},{"id":"3","text":"审核中"},{"id":"4","text":"培训中"},{"id":"5","text":"登记成绩"},{"id":"6","text":"培训结束"},{"id":"7","text":"全部"}]'
                                showNullItem="true" allowInput="false" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <a class="mini-button reload icon" iconCls="fa fa-plus" onclick="onAdd()"
                                tooltip="新增...">新增</a>
                            <a class="mini-button blueBtn" onclick="deleteClass()" tooltip="删除...">删除</a>
                            <a class="mini-button reload blueBtn" onclick="updataClaaa()" tooltip="修改...">修改</a>
                            <a class="mini-button reload icon" iconCls="fa fa-exchange" onclick="searchClass()"
                                tooltip="查看...">查看</a>
                            <a class="mini-button reload icon" iconCls="fa fa-exchange" onclick="trainingJd()"
                                tooltip="培训进度...">培训进度</a>
                            <a class="mini-button reload icon" iconCls="fa fa-exchange" onclick="pushClass()"
                                tooltip="发布班级...">发布班级</a>
                            <a class="mini-button reload icon" iconCls="fa fa-exchange" onclick="endtraining()"
                                tooltip="结束培训...">结束培训</a>
                            <a class="mini-button reload icon" iconCls="fa fa-exchange" onclick="searchStudent()"
                                tooltip="查看学员...">查看学员</a>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="mini-fit" borderStyle="border:0">
                <div id="grid" borderStyle="border:0" showHGridLines="false" showVGridLines="false"
                    class="mini-datagrid" width="100%" height="100%" url="../json/peixun.json" pageSize="15"
                    autoLoad="true" onpreload="preLoadGrid">
                    <div property="columns">
                        <div type="indexcolumn" width="40" headeralign="center" align="center">序号</div>
                        <div field="bjbh" headeralign="center" width="60" align="center">班级编号</div>
                        <div field="bjname" headeralign="center" width="80" align="center">班级名称</div>
                        <div field="zjjg" headeralign="center" width="60" align="center">主办机构</div>
                        <div field="dwjb" headeralign="center" width="140" align="center">组织单位级别</div>
                        <div field="jhnum" headeralign="center" width="140" align="center">计划人数</div>
                        <div field="bjSatud" headeralign="center" width="140" align="center">班级状态</div>
                        <div field="zhStaus" headeralign="center" align="center" width="60" align="center"
                            renderer="onStatusRenderer">账号状态</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>


<script type="text/javascript">
    mini.parse();
    var grid = tz.get('grid');
    var tree = tz.get("tree");
    // 整个培训表单
    var searchPeixunForm = tz.form("#searchPeixunForm");

  //重置按钮
  function resetSearchOrgByKey(e){
    tz.get("searchClassKey").setValue("");
    tz.get("searchClassName").setValue("");
}

    //按照搜索条件 搜索班级
    function searchOrgByKey() {
        var searchClassKey = tz.get("searchClassKey").getValue();
        var searchClassName = tz.get("searchClassName").getValue();

        if (searchOrgKey) {
            tree.load(tz.url("/sys/org/queryManagerTreeByName", {
                searchOrgKey: searchOrgKey
            }));
        } else {
            tree.load(tz.url("/sys/org/queryManagerLazyTree"));
        }
    }

  


</script>

</html>